package guda.mrpc.core.serialize.impl;

import guda.mrpc.core.common.util.SerializeUtil;
import guda.mrpc.core.serialize.ObjectSerialize;

/**
 * Created by well on 17/5/23.
 */
public class DefaultSerialize implements ObjectSerialize{
    @Override
    public <T> byte[] serialize(T obj) throws Exception {
        return SerializeUtil.serialize(obj);
    }

    @Override
    public <T> T deserialize(byte[] data, Class<T> clazz) throws Exception {
        return SerializeUtil.deserialize(data,clazz);
    }
}
